//
//  XTXHearCell.h
//  xiaotianxin
//
//  Created by XYC on 2019/10/25.
//  Copyright © 2019 XYC. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class XTXHearCell;
@protocol XTXHearCellDelegate <NSObject>
@optional

/// 点击更多按钮的代理
/// @param collectionViewCell collectionViewCell
/// @param user_id id
-(void)collectionViewCell:(XTXHearCell *)collectionViewCell moreBtnTouchEventWithID:(NSString *)user_id;

/// 播放音频的代理方法(已经开始播放)
/// @param collectionViewCell collectionViewCell
/// @param btn 播放按钮
-(void)collectionViewCell:(XTXHearCell *)collectionViewCell playVoiceBtnTouchEvent:(UIButton *)btn;

/// 音频结束结束的代理
/// @param collectionViewCell collectionViewCell
-(void)playEndVoiceEvent:(XTXHearCell *)collectionViewCell;

/// 音频将要开始播放
/// @param collectionViewCell collectionViewCell
-(void)voiceWillBeginplay:(XTXHearCell *)collectionViewCell;
@end


@class XTXVoiceModel;
@interface XTXHearCell : UICollectionViewCell
@property (nonatomic, strong) XTXVoiceModel *voiceModel;
@property (nonatomic, weak) id<XTXHearCellDelegate> delegate;
@property (nonatomic, strong) XTXUserModel *userModel;

///结束播放
-(void)playVoiceEndAnimation;
@end

NS_ASSUME_NONNULL_END
